<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.7"/>
<title>BrainTrain: header/KeyHandler.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">BrainTrain
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.7 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_key_handler_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">KeyHandler.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_key_handler_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#include &lt;osgGA/GUIEventHandler&gt;</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &lt;osgViewer/Viewer&gt;</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &lt;osg/PolygonMode&gt;</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &lt;osg/Program&gt;</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &quot;../header/FPSCameraManipulator.h&quot;</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &quot;../header/BaseInteractionCallback.h&quot;</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="keyword">namespace </span>brtr {</div>
<div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="classbrtr_1_1_key_handler.html">   23</a></span>&#160;    <span class="keyword">class </span><a class="code" href="classbrtr_1_1_key_handler.html">KeyHandler</a> :</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;        <span class="keyword">public</span> osgGA::GUIEventHandler {</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    <span class="keyword">public</span>:</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;        <a class="code" href="classbrtr_1_1_key_handler.html#aaae067fabc959780a9fae9c700c199da">KeyHandler</a>(osg::Node*, osg::Camera* postProcessCam, std::vector&lt;osg::ref_ptr&lt;osg::Program&gt;&gt; programs);</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classbrtr_1_1_key_handler.html#a02df9f4339712d5b8b2b25b89048cf47">handle</a>(<span class="keyword">const</span> osgGA::GUIEventAdapter&amp; ea, osgGA::GUIActionAdapter&amp; aa);</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    <span class="keyword">protected</span>:</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;        <a class="code" href="classbrtr_1_1_key_handler.html#aabad0b142ba1d2e648069b4e8af17797">~KeyHandler</a>();</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;    <span class="keyword">private</span>:</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="classbrtr_1_1_key_handler.html#a5af6a6e66e8754591b3425addc6e6858">handleKeyDown</a>(<span class="keyword">const</span> osgGA::GUIEventAdapter&amp; ea, osgGA::GUIActionAdapter&amp; aa);</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="classbrtr_1_1_key_handler.html#a7f402d48b863ed19ef47038a32d1d05c">mouseIntersection</a>(osgGA::GUIActionAdapter&amp; aa);</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;        <a class="code" href="classbrtr_1_1_base_interaction_callback.html">brtr::BaseInteractionCallback</a>* <a class="code" href="classbrtr_1_1_key_handler.html#a1925fa114839192716167477714abfdc">modifyText</a>(<span class="keywordtype">bool</span> show);</div>
<div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="classbrtr_1_1_key_handler.html#a4b0e380186a8172af6cf7c10dcff675a">   53</a></span>&#160;        osg::ref_ptr&lt;osg::Drawable&gt; <a class="code" href="classbrtr_1_1_key_handler.html#a4b0e380186a8172af6cf7c10dcff675a">_curDrawable</a>;</div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="classbrtr_1_1_key_handler.html#a2ff68d9c79145d235f50fec1da625f99">   54</a></span>&#160;        osg::ref_ptr&lt;osg::Node&gt; <a class="code" href="classbrtr_1_1_key_handler.html#a2ff68d9c79145d235f50fec1da625f99">_rootNode</a>;</div>
<div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="classbrtr_1_1_key_handler.html#a7aff4e23d4c614d8e0ccdc29a3c8882f">   55</a></span>&#160;        osg::ref_ptr&lt;osg::PolygonMode&gt; <a class="code" href="classbrtr_1_1_key_handler.html#a7aff4e23d4c614d8e0ccdc29a3c8882f">_wireFrameMode</a>;</div>
<div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="classbrtr_1_1_key_handler.html#ae210945e48748029cbea37fde7d601b5">   56</a></span>&#160;        osg::ref_ptr&lt;osg::PolygonMode&gt; <a class="code" href="classbrtr_1_1_key_handler.html#ae210945e48748029cbea37fde7d601b5">_normaleMode</a>;</div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="classbrtr_1_1_key_handler.html#aa4cc5f6ac9134e473f37968dfb1dd821">   57</a></span>&#160;        osg::ref_ptr&lt;osg::Camera&gt; <a class="code" href="classbrtr_1_1_key_handler.html#aa4cc5f6ac9134e473f37968dfb1dd821">_postProcessCam</a>;</div>
<div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="classbrtr_1_1_key_handler.html#a492d086b9458475e595b3627a8dee0f9">   58</a></span>&#160;        std::vector&lt;osg::ref_ptr&lt;osg::Program&gt;&gt; <a class="code" href="classbrtr_1_1_key_handler.html#a492d086b9458475e595b3627a8dee0f9">_programs</a>;</div>
<div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="classbrtr_1_1_key_handler.html#a1b2404dcd19426a93d4474cd45da84e8">   59</a></span>&#160;        osg::ref_ptr&lt; const osgGA::GUIEventAdapter &gt; <a class="code" href="classbrtr_1_1_key_handler.html#a1b2404dcd19426a93d4474cd45da84e8">_mouseEvent</a>;</div>
<div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="classbrtr_1_1_key_handler.html#a6939e2c5e93e53d6090c999eae2fb927">   60</a></span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="classbrtr_1_1_key_handler.html#a6939e2c5e93e53d6090c999eae2fb927">_isWireFrame</a>;</div>
<div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="classbrtr_1_1_key_handler.html#a578b374029e318a509983a01253a7736">   61</a></span>&#160;        <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classbrtr_1_1_key_handler.html#a578b374029e318a509983a01253a7736">_curProg</a>;</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    };</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;}</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;</div>
<div class="ttc" id="classbrtr_1_1_key_handler_html_a7f402d48b863ed19ef47038a32d1d05c"><div class="ttname"><a href="classbrtr_1_1_key_handler.html#a7f402d48b863ed19ef47038a32d1d05c">brtr::KeyHandler::mouseIntersection</a></div><div class="ttdeci">void mouseIntersection(osgGA::GUIActionAdapter &amp;aa)</div><div class="ttdoc">Checks, if under the mouse (e.a center of screen) is an interact-able object (e.a geometry) ...</div><div class="ttdef"><b>Definition:</b> <a href="_key_handler_8cpp_source.html#l00076">KeyHandler.cpp:76</a></div></div>
<div class="ttc" id="classbrtr_1_1_key_handler_html_a6939e2c5e93e53d6090c999eae2fb927"><div class="ttname"><a href="classbrtr_1_1_key_handler.html#a6939e2c5e93e53d6090c999eae2fb927">brtr::KeyHandler::_isWireFrame</a></div><div class="ttdeci">bool _isWireFrame</div><div class="ttdef"><b>Definition:</b> <a href="_key_handler_8h_source.html#l00060">KeyHandler.h:60</a></div></div>
<div class="ttc" id="classbrtr_1_1_key_handler_html"><div class="ttname"><a href="classbrtr_1_1_key_handler.html">brtr::KeyHandler</a></div><div class="ttdoc">Key Handler Class, handles all of our KeyFunctions, which do not belong to camera control (this are h...</div><div class="ttdef"><b>Definition:</b> <a href="_key_handler_8h_source.html#l00023">KeyHandler.h:23</a></div></div>
<div class="ttc" id="classbrtr_1_1_key_handler_html_aaae067fabc959780a9fae9c700c199da"><div class="ttname"><a href="classbrtr_1_1_key_handler.html#aaae067fabc959780a9fae9c700c199da">brtr::KeyHandler::KeyHandler</a></div><div class="ttdeci">KeyHandler(osg::Node *, osg::Camera *postProcessCam, std::vector&lt; osg::ref_ptr&lt; osg::Program &gt;&gt; programs)</div><div class="ttdoc">Constructor. </div><div class="ttdef"><b>Definition:</b> <a href="_key_handler_8cpp_source.html#l00008">KeyHandler.cpp:8</a></div></div>
<div class="ttc" id="classbrtr_1_1_key_handler_html_ae210945e48748029cbea37fde7d601b5"><div class="ttname"><a href="classbrtr_1_1_key_handler.html#ae210945e48748029cbea37fde7d601b5">brtr::KeyHandler::_normaleMode</a></div><div class="ttdeci">osg::ref_ptr&lt; osg::PolygonMode &gt; _normaleMode</div><div class="ttdef"><b>Definition:</b> <a href="_key_handler_8h_source.html#l00056">KeyHandler.h:56</a></div></div>
<div class="ttc" id="classbrtr_1_1_key_handler_html_aa4cc5f6ac9134e473f37968dfb1dd821"><div class="ttname"><a href="classbrtr_1_1_key_handler.html#aa4cc5f6ac9134e473f37968dfb1dd821">brtr::KeyHandler::_postProcessCam</a></div><div class="ttdeci">osg::ref_ptr&lt; osg::Camera &gt; _postProcessCam</div><div class="ttdef"><b>Definition:</b> <a href="_key_handler_8h_source.html#l00057">KeyHandler.h:57</a></div></div>
<div class="ttc" id="classbrtr_1_1_key_handler_html_a02df9f4339712d5b8b2b25b89048cf47"><div class="ttname"><a href="classbrtr_1_1_key_handler.html#a02df9f4339712d5b8b2b25b89048cf47">brtr::KeyHandler::handle</a></div><div class="ttdeci">virtual bool handle(const osgGA::GUIEventAdapter &amp;ea, osgGA::GUIActionAdapter &amp;aa)</div><div class="ttdef"><b>Definition:</b> <a href="_key_handler_8cpp_source.html#l00021">KeyHandler.cpp:21</a></div></div>
<div class="ttc" id="classbrtr_1_1_key_handler_html_a4b0e380186a8172af6cf7c10dcff675a"><div class="ttname"><a href="classbrtr_1_1_key_handler.html#a4b0e380186a8172af6cf7c10dcff675a">brtr::KeyHandler::_curDrawable</a></div><div class="ttdeci">osg::ref_ptr&lt; osg::Drawable &gt; _curDrawable</div><div class="ttdef"><b>Definition:</b> <a href="_key_handler_8h_source.html#l00053">KeyHandler.h:53</a></div></div>
<div class="ttc" id="classbrtr_1_1_key_handler_html_a578b374029e318a509983a01253a7736"><div class="ttname"><a href="classbrtr_1_1_key_handler.html#a578b374029e318a509983a01253a7736">brtr::KeyHandler::_curProg</a></div><div class="ttdeci">unsigned int _curProg</div><div class="ttdef"><b>Definition:</b> <a href="_key_handler_8h_source.html#l00061">KeyHandler.h:61</a></div></div>
<div class="ttc" id="classbrtr_1_1_base_interaction_callback_html"><div class="ttname"><a href="classbrtr_1_1_base_interaction_callback.html">brtr::BaseInteractionCallback</a></div><div class="ttdoc">This is the TemplateClass for InteractionCallbacks. </div><div class="ttdef"><b>Definition:</b> <a href="_base_interaction_callback_8h_source.html#l00024">BaseInteractionCallback.h:24</a></div></div>
<div class="ttc" id="classbrtr_1_1_key_handler_html_a2ff68d9c79145d235f50fec1da625f99"><div class="ttname"><a href="classbrtr_1_1_key_handler.html#a2ff68d9c79145d235f50fec1da625f99">brtr::KeyHandler::_rootNode</a></div><div class="ttdeci">osg::ref_ptr&lt; osg::Node &gt; _rootNode</div><div class="ttdef"><b>Definition:</b> <a href="_key_handler_8h_source.html#l00054">KeyHandler.h:54</a></div></div>
<div class="ttc" id="classbrtr_1_1_key_handler_html_a7aff4e23d4c614d8e0ccdc29a3c8882f"><div class="ttname"><a href="classbrtr_1_1_key_handler.html#a7aff4e23d4c614d8e0ccdc29a3c8882f">brtr::KeyHandler::_wireFrameMode</a></div><div class="ttdeci">osg::ref_ptr&lt; osg::PolygonMode &gt; _wireFrameMode</div><div class="ttdef"><b>Definition:</b> <a href="_key_handler_8h_source.html#l00055">KeyHandler.h:55</a></div></div>
<div class="ttc" id="classbrtr_1_1_key_handler_html_a5af6a6e66e8754591b3425addc6e6858"><div class="ttname"><a href="classbrtr_1_1_key_handler.html#a5af6a6e66e8754591b3425addc6e6858">brtr::KeyHandler::handleKeyDown</a></div><div class="ttdeci">bool handleKeyDown(const osgGA::GUIEventAdapter &amp;ea, osgGA::GUIActionAdapter &amp;aa)</div><div class="ttdef"><b>Definition:</b> <a href="_key_handler_8cpp_source.html#l00053">KeyHandler.cpp:53</a></div></div>
<div class="ttc" id="classbrtr_1_1_key_handler_html_a492d086b9458475e595b3627a8dee0f9"><div class="ttname"><a href="classbrtr_1_1_key_handler.html#a492d086b9458475e595b3627a8dee0f9">brtr::KeyHandler::_programs</a></div><div class="ttdeci">std::vector&lt; osg::ref_ptr&lt; osg::Program &gt; &gt; _programs</div><div class="ttdef"><b>Definition:</b> <a href="_key_handler_8h_source.html#l00058">KeyHandler.h:58</a></div></div>
<div class="ttc" id="classbrtr_1_1_key_handler_html_a1925fa114839192716167477714abfdc"><div class="ttname"><a href="classbrtr_1_1_key_handler.html#a1925fa114839192716167477714abfdc">brtr::KeyHandler::modifyText</a></div><div class="ttdeci">brtr::BaseInteractionCallback * modifyText(bool show)</div><div class="ttdoc">Shows the InteractionMessage on screen, if there is an InteractionObject beneath the mouse (e...</div><div class="ttdef"><b>Definition:</b> <a href="_key_handler_8cpp_source.html#l00101">KeyHandler.cpp:101</a></div></div>
<div class="ttc" id="classbrtr_1_1_key_handler_html_aabad0b142ba1d2e648069b4e8af17797"><div class="ttname"><a href="classbrtr_1_1_key_handler.html#aabad0b142ba1d2e648069b4e8af17797">brtr::KeyHandler::~KeyHandler</a></div><div class="ttdeci">~KeyHandler()</div><div class="ttdef"><b>Definition:</b> <a href="_key_handler_8cpp_source.html#l00019">KeyHandler.cpp:19</a></div></div>
<div class="ttc" id="classbrtr_1_1_key_handler_html_a1b2404dcd19426a93d4474cd45da84e8"><div class="ttname"><a href="classbrtr_1_1_key_handler.html#a1b2404dcd19426a93d4474cd45da84e8">brtr::KeyHandler::_mouseEvent</a></div><div class="ttdeci">osg::ref_ptr&lt; const osgGA::GUIEventAdapter &gt; _mouseEvent</div><div class="ttdef"><b>Definition:</b> <a href="_key_handler_8h_source.html#l00059">KeyHandler.h:59</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_1ec98ce50fa6ec55b40b8ffb1df38c3c.html">header</a></li><li class="navelem"><a class="el" href="_key_handler_8h.html">KeyHandler.h</a></li>
    <li class="footer">Generated on Thu Jul 17 2014 01:40:24 for BrainTrain by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.7 </li>
  </ul>
</div>
</body>
</html>
